package com.unidust.service;

import com.unidust.domain.mappers.CustomerType;
import com.unidust.domain.mappers.CustomerTypeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by admin on 2017/8/11.
 */
@Service
public class CustomerTypeService {

    @Autowired
    private CustomerTypeMapper customerTypeMapper;

    @Transactional
    public void dbTest() {
        CustomerType customerType = new CustomerType();
        customerType.setId("abc");
        customerTypeMapper.insertCt(customerType);
//        if(true) {
//            throw new RuntimeException();
//        }
        customerType.setId("abc1");
        customerTypeMapper.insertCt(customerType);
    }

}
